package com.goukakuproject;

import java.util.ArrayList;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.LabeledIntent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RelativeLayout;

public class GoukakumainActivity extends Activity implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_goukakumain);		
		this.setTitle("Trang chủ");
		Button btnN2 = (Button) findViewById(R.id.btnn2);
		btnN2.setOnClickListener(this);
		Button btnN3 = (Button) findViewById(R.id.btnn3);
		btnN3.setOnClickListener(this);
		Button btnN4 = (Button) findViewById(R.id.btnn4);
		btnN4.setOnClickListener(this);
		Button btnN5 = (Button) findViewById(R.id.btnn5);
		btnN5.setOnClickListener(this);
		Button btndoExam = (Button) findViewById(R.id.btnDoexam);
		btndoExam.setOnClickListener(this);
		Button b = new Button(getApplicationContext());
		b.setText("12345");
//		RelativeLayout relativeLayout = (RelativeLayout)findViewById(R.layout.activity_gktabmain);
//		relativeLayout.addView(b);
//		setContentView(relativeLayout);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.goukakumain, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.btnn2:
			 Intent myIntent=new Intent(GoukakumainActivity.this, GKLeftmenu.class);		 
			 Bundle bundle=new Bundle();		 			 
			 bundle.putInt("N", 2);
			 myIntent.putExtra("Main", bundle);
			 startActivity(myIntent);
			break;
		case R.id.btnn3:
			 myIntent=new Intent(GoukakumainActivity.this, GKLeftmenu.class);		 
			 bundle=new Bundle();		 			 
			 bundle.putInt("N", 3);
			 myIntent.putExtra("Main", bundle);
			 startActivity(myIntent);
			break;
		case R.id.btnn4:
			myIntent=new Intent(GoukakumainActivity.this, GKLeftmenu.class);		 
			 bundle=new Bundle();		 			 
			 bundle.putInt("N", 4);
			 myIntent.putExtra("Main", bundle);
			 startActivity(myIntent);
			break;
		case R.id.btnn5:
			myIntent=new Intent(GoukakumainActivity.this, GKLeftmenu.class);		 
			 bundle=new Bundle();		 			 
			 bundle.putInt("N", 5);
			 myIntent.putExtra("Main", bundle);
			 startActivity(myIntent);
			break;
		case R.id.btnDoexam:
			break;	
			}

		
	}

}
